<div class="row justify-content-center">
    <div class="col-8">
        <div *ngIf="job">
            <h2><span>Job</span> {{ job.id }}</h2>

            <hr>

            <jhi-alert-error></jhi-alert-error>

            <dl class="row-md jh-entity-details">
                <dt><span>Job Title</span></dt>
                <dd>
                    <span>{{ job.jobTitle }}</span>
                </dd>
                <dt><span>Min Salary</span></dt>
                <dd>
                    <span>{{ job.minSalary }}</span>
                </dd>
                <dt><span>Max Salary</span></dt>
                <dd>
                    <span>{{ job.maxSalary }}</span>
                </dd>
                <dt><span>Task</span></dt>
                <dd>
                    <span *ngFor="let task of job.tasks; let last = last">
                        <a [routerLink]="['/task', task?.id, 'view']">{{ task.title }}</a>{{ last ? '' : ', ' }}
                    </span>
                </dd>
                <dt><span>Employee</span></dt>
                <dd>
                    <div *ngIf="job.employeeId">
                        <a [routerLink]="['/employee', job.employeeId, 'view']">{{ job.employeeId }}</a>
                    </div>
                </dd>
            </dl>

            <button type="submit"
                    (click)="previousState()"
                    class="btn btn-info">
                <fa-icon icon="arrow-left"></fa-icon>&nbsp;<span>Back</span>
            </button>

            <button type="button"
                    [routerLink]="['/job', job.id, 'edit']"
                    class="btn btn-primary">
                <fa-icon icon="pencil-alt"></fa-icon>&nbsp;<span>Edit</span>
            </button>
        </div>
    </div>
</div>
